package com.jiazhong.spring.aop;

import com.jiazhong.spring.aop.target.UserTarget;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("com.jiazhong.spring.aop");
        UserTarget target = context.getBean(UserTarget.class);
        target.save("张三");
        System.out.println(target);
    }
}